package com.xzit.homework.静态代理;

public class SunWuKongProxy implements Lady {

    private Lady realLady;

    // 代理谁（变成谁）
    public SunWuKongProxy(Lady realLady) {
        this.realLady = realLady;
    }

    @Override
    public void fightPig() {
        System.out.println("孙悟空变成高翠兰，准备战斗！");
        System.out.println("孙悟空一棒打飞了猪八戒！");
    }

    @Override
    public void catchPig() {
        System.out.println("孙悟空现出原形，一把抓住了猪八戒！");
    }
}
